#include<iostream>
#include<string.h>
void citire_vector();
void afisare_vector();
void numarare();
using namespace std;
int v[100],n;
int main()
{
    citire_vector();
    numarare();
    return 0;
}
void citire_vector()
{
    cout<<"cate elemente?? ";
    cin>>n;
    cout<<"introduceti elementele vectorului: ";
    for(int i=0;i<n;++i)
        cin>>v[i];
}

void numarare()
{
    int counter=1,max=0,poz=0,poz_max=0;
    for(int i=1;i<n;++i)
    {
        if(v[i]==v[i-1])
            counter++;
        else if(counter>max)
        {
            max= counter;
            counter=1;
            poz_max=poz;
        }
        else
        {
            counter=1;
            poz=i;
        }
    }
    cout<<max<<" "<<poz_max+1;
}
